<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>

    <script src="./vue.js"></script>
    <script>
      Vue.createApp({
        template: `
          <h2>{{counter}}</h2>
          <button @click="increase">+1</button>
          <button @click="decrease">-1</button>
        `,
        data() {
          return {
            counter: 0
          }
        },
        methods: {
          increase() {
            this.counter++
          },
          decrease() {
            this.counter--
          }
        }
      }).mount("#app")
    </script>
  </body>
</html>
